Flickr - Search Photos
(15 actions, 23 KB)
0 Comment
https://www.flickr.com/services/api/flickr.photos.search.html
1 DataJar > GetValueIntent »
keyPath
:
API Credentials.Flickr
2 Dictionary »
{ "api_key": "
[1 Value
as Dictionary.apiKey
]
", "method": "flickr.photos.search", "text": "
[Shortcut Input]
", "media": "photos", "content_types": "0", "per_page": "30", "page": "1", "format": "json", "nojsoncallback": "1" }
3 ToolboxProForShortcuts > CreateQueryItemIntent »
dictionary
:
[2 Dictionary]
inputType
:
dictionary
4 ToolboxProForShortcuts > BuildURLIntent »
path
:
/services/rest
host
:
www.flickr.com
queryItems
:
[3 Query Item]
5 Get Contents of URL
[4 URL]
»
RequestVariable
:
[? Shortcut Result]
HTTPHeaders
:
{}
ShowHeaders
:
true
HTTPMethod
:
GET
HTTPBodyType
:
File
6 Get Dictionary Value for
photos.photo
in
[5 Contents of URL
as Dictionary
]
»
7 Get
Random Item
from List
[6 Dictionary Value]
»
9
10
8 Comment
More info on image URL mapping: https://www.flickr.com/services/api/misc.urls.html
9 URL
https://live.staticflickr.com/
[7 Item from List
as Dictionary.server
]
/
[7 Item from List
as Dictionary.id
]
_
[7 Item from List
as Dictionary.secret
]
_b.jpg
»
13
10 Get Dictionary Value for
id
in
[7 Item from List]
»
11 Run Shortcut
_Base58 Enconding for photoId
»
Input
:
[10 Dictionary Value]
Workflow
:
{ "workflowIdentifier": "EBA631B5-CDCB-4D9E-97A3-ABD9AAE46BF7", "workflowName": "_Base58 Enconding for photoId", "isSelf": false }
12 URL
https://flic.kr/p/
[11 Shortcut Result]
»
13 Dictionary »
{ "regularURL": "
[9 URL]
", "shortURL": "
[12 URL]
" }
14 Stop and Output
[13 Dictionary]